﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharedGenomics.Annotations
{
    /// <summary>
    /// 
    /// </summary>
    public class AnnotationKey
    {
        private string _key;

        public AnnotationKey(string key)
        {
            this.Key = key;
        }

        public override bool Equals(object obj)
        {
            AnnotationKey comp = obj as AnnotationKey;

            return (comp != null && this.Key.Equals(comp.Key));
        }

        public override int GetHashCode()
        {
            return this.Key.GetHashCode();
        }

        public static implicit operator AnnotationKey(string item)
        {
            return new AnnotationKey(item);
        }

        public static bool operator ==(AnnotationKey left, AnnotationKey right)
        {
            return Object.Equals(left, right);
        }

        public static bool operator !=(AnnotationKey left, AnnotationKey right)
        {
            return !(left == right);
        }

        public string Key
        {
            get { return this._key; }
            private set
            {
                if(value == null)
                    throw new ArgumentNullException("Key");

                this._key = value;
            }
        }

        public static AnnotationKey SnpName
        {
            get { return "SnpName"; }
        }

        public static AnnotationKey SnpId
        {
            get { return "SnpId"; }
        }

        public static AnnotationKey OrganismName
        {
            get { return "OrganismName"; }
        }

        public static AnnotationKey GeneName
        {
            get { return "GeneName"; }
        }

        public static AnnotationKey Chromosome
        {
            get { return "Chromosome"; }
        }

        public static AnnotationKey ChromosomalPosition
        {
            get { return "ChromosomalPosition"; }
        }

        public static AnnotationKey EntrezGeneId
        {
            get { return "EntrezGeneId"; }
        }

        public static AnnotationKey Publications
        {
            get { return "Publications"; }
        }

        public static AnnotationKey KeggId
        {
            get { return "KeggId"; }
        }

        public static AnnotationKey KeggPathway
        {
            get { return "KeggPathway"; }
        }

        public static AnnotationKey Gene
        {
            get { return "Gene"; }
        }

        public static AnnotationKey GoogleSearch
        {
            get { return "GoogleSearch"; }
        }

        public static AnnotationKey NcbiSummary
        {
            get { return "NcbiSummary"; }
        }

        public static AnnotationKey PubMedSearch
        {
            get { return "PubMedSearch"; }
        }

        public static AnnotationKey UcscBrowser
        {
            get { return "UcscBrowser"; }
        }

        public static AnnotationKey Taverna
        {
            get { return "Taverna"; }
        }

        //TODO: find out what this is for...
        public static AnnotationKey Uri
        {
            get { return "Uri"; }
        }
    }
}
